-- GENERATED SPELL FOR [Magus Rimtori] --


function spell0_8578(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8578', 3000, 1)
end

function spell1_8578(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_8578', 8340, 1)
end

function Sorts_8578(pUnit, Event)
local choix_sorts_8578 = math.random(0, 1)
if choix_sorts_8578 == 0 then
pUnit:RegisterEvent('spell0_8578', 1, 1)
end
if choix_sorts_8578 == 1 then
pUnit:RegisterEvent('spell1_8578', 1, 1)
end
end

function mob8578_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8578', math.random(1500, 3000), 1)
end

function mob8578_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8578_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8578_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8578, 1, 'mob8578_Action')
RegisterUnitEvent(8578, 2, 'mob8578_Leave')
RegisterUnitEvent(8578, 3, 'mob8578_Kill')
RegisterUnitEvent(8578, 4, 'mob8578_Die')
